

import java.util.ArrayList;
import java.util.List;

import org.apache.struts2.ServletActionContext;


public class TreeAction extends WisdoorAction {
	
	private List<SimpleTreeNode> nodes=new ArrayList();
	private String id;
	
	public String demoTest(){
		for(int i=0;i<10;i++){
			String nodeId=("-1".equals(id)||null==id?"":id)+i;
			nodes.add(new SimpleTreeNode(nodeId,"node_"+nodeId,null,nodeId.length()>4?false:true));
		}
		return SUCCESS;
	}
	

	public List<SimpleTreeNode> getNodes() {
		return nodes;
	}

	public void setNodes(List<SimpleTreeNode> nodes) {
		this.nodes = nodes;
	}


	public String getId() {
		return id;
	}


	public void setId(String id) {
		this.id = id;
	}
	
	
}
